package com.lznb.cloud.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lznb.cloud.utils.IsQuery;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;


/**
 * 栏目
 *
 * @author mzy
 * @email 1992lcg@163.com
 * @date ${datetime}
 */
@Entity
@Table(name = "NEWS_CATEGORY")
public class NewsCategory implements Serializable {
    private static final long serialVersionUID = 1L;

    //主键
    @Id
    private String categoryId;

    //名称
    @IsQuery
    private String categoryName;

    //创建人
    private String creatorId;

    //父ID
    private String categoryPid;
    private String remarks;

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //创建时间
    private Date createTime;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //修改时间
    private Date updateTime;


    /**
     * 设置：主键
     */
    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    /**
     * 获取：主键
     */
    public String getCategoryId() {
        return categoryId;
    }

    /**
     * 设置：名称
     */
    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    /**
     * 获取：名称
     */
    public String getCategoryName() {
        return categoryName;
    }

    /**
     * 设置：创建人
     */
    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    /**
     * 获取：创建人
     */
    public String getCreatorId() {
        return creatorId;
    }

    /**
     * 设置：父ID
     */
    public void setCategoryPid(String categoryPid) {
        this.categoryPid = categoryPid;
    }

    /**
     * 获取：父ID
     */
    public String getCategoryPid() {
        return categoryPid;
    }

    /**
     * 设置：创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取：创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置：修改时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取：修改时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }
}
